package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpReportsCallCenterReportsAgentIncdentDetailsPageUtil extends SeleniumPageUtil {
	public final static By RCCRAIV_SPAN_DATE_RANGE = By.id("ctl44_lblDateRange");
	public final static By RCCRAIV_SPAN_REQD = By.xpath("//*[@id='ctl44_tblDateRange']/tbody/tr/td[1]/span[2]");
	public final static By RCCRAIV_INPUT_START_DATE = By.id("ctl44_dteStartDate_txtDatePart");
	public final static By RCCRAIV_IMG_START_DATE = By.id("ctl44_dteStartDate_imgDateCalendar");
	public final static By RCCRAIV_DIV_START_DATE_CLOSE = By.id("ctl44_dteStartDate_txtDatePart_CalendarExtender_close");
	public final static By RCCRAIV_INPUT_END_DATE = By.id("ctl44_dteEndDate_txtDatePart");
	public final static By RCCRAIV_IMG_END_DATE = By.id("ctl44_dteEndDate_imgDateCalendar");
	public final static By RCCRAIV_DIV_END_DATE_CLOSE = By.id("ctl44_dteEndDate_txtDatePart_CalendarExtender_close");
	public final static By RCCRAIV_INPUT_SUBMIT = By.id("ctl44_btnDateRange");
	
	public final static By RCCRAIV_SPAN_HEADER = By.id("ctl44_Report_Header_lblHeader");
	
	public final static By RCCRAIV_IMG_REPORT_PREFERENCES = By.id("ctl44_Report_Header_imgPreferences");
	public final static By RCCRAIV_IMG_EXPORT = By.id("ctl44_Report_Header_imgExcelExport");
	
	public final static By RCCRAIV_TD_PAGE = By.xpath("//*[@id='form1']/table/tbody/tr[2]/td/div/table[3]/tbody/tr/td[1]");
	public final static By RCCRAIV_SPAN_PAGE_START_NO = By.id("ctl44_Report_PagingTop_lblPagingPageNumber");
	public final static By RCCRAIV_TD_OF = By.xpath("//*[@id='form1']/table/tbody/tr[2]/td/div/table[3]/tbody/tr/td[3]");
	public final static By RCCRAIV_SPAN_PAGE_COUNT = By.id("ctl44_Report_PagingTop_lblPagingPageCount");
	
	public final static By RCCRAIV_INPUT_FIRST = By.id("ctl44_Report_PagingTop_imgFirst");
	public final static By RCCRAIV_INPUT_PREVIOUS = By.id("ctl44_Report_PagingTop_imgPrevious");
	public final static By RCCRAIV_INPUT_NEXT = By.id("ctl44_Report_PagingTop_imgNext");
	public final static By RCCRAIV_INPUT_LAST = By.id("ctl44_Report_PagingTop_imgLast");
	
	public final static By RCCRAIV_IMG_FILTER_1 = By.id("ctl44_Report_filter_1\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_2 = By.id("ctl44_Report_filter_2\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_25 = By.id("ctl44_Report_filter_25\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_3 = By.id("ctl44_Report_filter_3\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_4 = By.id("ctl44_Report_filter_4\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_5 = By.id("ctl44_Report_filter_5\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_6 = By.id("ctl44_Report_filter_6\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_7 = By.id("ctl44_Report_filter_7\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_8 = By.id("ctl44_Report_filter_8\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_9 = By.id("ctl44_Report_filter_9\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_10 = By.id("ctl44_Report_filter_10\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_11 = By.id("ctl44_Report_filter_11\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_12 = By.id("ctl44_Report_filter_12\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_13 = By.id("ctl44_Report_filter_13\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_14 = By.id("ctl44_Report_filter_14\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_15 = By.id("ctl44_Report_filter_15\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_16 = By.id("ctl44_Report_filter_16\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_165 = By.id("ctl44_Report_filter_165\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_17 = By.id("ctl44_Report_filter_17\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_18 = By.id("ctl44_Report_filter_18\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_19 = By.id("ctl44_Report_filter_19\r\n                        ");
	public final static By RCCRAIV_IMG_FILTER_20 = By.id("ctl44_Report_filter_20\r\n                        ");
	
	public final static By RCCRAIV_TH_INCIDENT_NUMBER = By.id("ctl44_Report_sort_1\r\n                    ");
	public final static By RCCRAIV_TH_STATUS = By.id("ctl44_Report_sort_2\r\n                    ");
	public final static By RCCRAIV_TH_INC_AGENT = By.id("ctl44_Report_sort_25\r\n                    ");
	public final static By RCCRAIV_TH_INCIDENT_DATE = By.id("ctl44_Report_sort_3\r\n                    ");
	public final static By RCCRAIV_TH_DESCRIPTION = By.id("ctl44_Report_sort_4\r\n                    ");
	public final static By RCCRAIV_TH_PRIORITY = By.id("ctl44_Report_sort_5\r\n                    ");
	public final static By RCCRAIV_TH_CONTRACT_NUMBER = By.id("ctl44_Report_sort_6\r\n                    ");
	public final static By RCCRAIV_TH_LINE = By.id("ctl44_Report_sort_7\r\n                    ");
	public final static By RCCRAIV_TH_SLA = By.id("ctl44_Report_sort_8\r\n                    ");
	public final static By RCCRAIV_TH_ASSET = By.id("ctl44_Report_sort_9\r\n                    ");
	public final static By RCCRAIV_TH_SERIAL_NUMBER = By.id("ctl44_Report_sort_10\r\n                    ");
	public final static By RCCRAIV_TH_REQUESTER = By.id("ctl44_Report_sort_11\r\n                    ");
	public final static By RCCRAIV_TH_FOLLOW_UP_DATE = By.id("ctl44_Report_sort_12\r\n                    ");
	public final static By RCCRAIV_TH_CLOSE_DATE = By.id("ctl44_Report_sort_13\r\n                    ");
	public final static By RCCRAIV_TH_CUSTOMER_TICKET_NUMBER = By.id("ctl44_Report_sort_14\r\n                    ");
	public final static By RCCRAIV_TH_SMS = By.id("ctl44_Report_sort_15\r\n                    ");
	public final static By RCCRAIV_TH_EVENT_CODE = By.id("ctl44_Report_sort_16\r\n                    ");
	public final static By RCCRAIV_TH_EVT_AGENT = By.id("ctl44_Report_sort_165\r\n                    ");
	public final static By RCCRAIV_TH_EVENT_DATE = By.id("ctl44_Report_sort_17\r\n                    ");
	public final static By RCCRAIV_TH_CONTACT = By.id("ctl44_Report_sort_18\r\n                    ");
	public final static By RCCRAIV_TH_CREATE_DATE = By.id("ctl44_Report_sort_19\r\n                    ");
	public final static By RCCRAIV_TH_NOTES = By.id("ctl44_Report_sort_20\r\n                    ");
	
	public static void enterReportsCallCenterReportsAgentIncidentVolumePage(){
		SpHomePageUtil.enter();
		SpHomePageUtil.enterReportsDefaultPage();
		SeleniumUtil.click(SeleniumUtil.getCachedElement(SpReportsDefaultPageUtil.RD_LINK_AGENT_INCIDENT_EVENT_DETAILS));
		waitForPageToLoad();
	}
	
	public static void waitForPageToLoad() {
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_REPORTS_NAME);
		SeleniumUtil.waitOnElements(new By[]{
				RCCRAIV_IMG_EXPORT, RCCRAIV_INPUT_FIRST, RCCRAIV_INPUT_PREVIOUS, RCCRAIV_INPUT_NEXT,RCCRAIV_INPUT_LAST, 
				RCCRAIV_IMG_FILTER_1, RCCRAIV_IMG_FILTER_2, RCCRAIV_IMG_FILTER_25, RCCRAIV_IMG_FILTER_3, RCCRAIV_IMG_FILTER_4, RCCRAIV_IMG_FILTER_5, RCCRAIV_IMG_FILTER_6, 
				RCCRAIV_IMG_FILTER_7, RCCRAIV_IMG_FILTER_8, RCCRAIV_IMG_FILTER_9, RCCRAIV_IMG_FILTER_10, RCCRAIV_IMG_FILTER_12, RCCRAIV_IMG_FILTER_13, 
				RCCRAIV_IMG_FILTER_14, RCCRAIV_IMG_FILTER_15, RCCRAIV_IMG_FILTER_165, RCCRAIV_IMG_FILTER_16, RCCRAIV_IMG_FILTER_17, RCCRAIV_IMG_FILTER_18, RCCRAIV_IMG_FILTER_19, 
				RCCRAIV_IMG_FILTER_20, RCCRAIV_IMG_START_DATE, RCCRAIV_IMG_END_DATE, RCCRAIV_INPUT_SUBMIT
			});
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_START_DATE));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_END_DATE));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_INPUT_SUBMIT));
//		SmsSeleniumUtil.isDisplayed(SmsSeleniumUtil.findElement(RCCRAIV_IMG_REPORT_PREFERENCES));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_EXPORT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_INPUT_FIRST));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_INPUT_PREVIOUS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_INPUT_NEXT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_INPUT_LAST));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_1));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_2));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_25));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_3));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_4));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_5));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_6));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_7));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_8));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_9));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_10));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_11));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_12));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_13));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_14));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_15));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_16));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_165));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_17));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_18));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_19));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCCRAIV_IMG_FILTER_20));
	}
}
